<template>
	<view>
		<TopicList :list="list"></TopicList>
	</view>
</template>

<script>
	import TopicList from '../../components/topic-list.vue'
	import ListOptions from '../../minxins/list-options.js'
	export default {
		data() {
			return {
				page: 'my-topic'
			}
		},
		mixins: [ListOptions],
		components: {
			TopicList
		},
		async onLoad(options) {
			this.options = Object.assign({}, this.options, options)
			try {
				let result = await this.fetchPageData()
				this.renderPage(result)
				let user = this.$getUser()
				let title = "我的帖子";
				uni.setNavigationBarTitle({title: title});
			} catch (error) {
				
			}
		},
		methods: {
			async fetchPageData() {
				this.options.detail_excerpt = 1;
				let result = await this.$api.listMyTopic(this.options);
				return result;
			}
		}
		
	}
</script>

<style>
	
</style>
